var replaceDigits = function(s) {
  s = s.split('');
  function shift(c,x){
      let num = c.charCodeAt() + Number(x);
      let z = 'z';
      if(num > z.charCodeAt()){
        num = z.charCodeAt();
      }
       return String.fromCharCode(num);
  }
  for(let i = 1;i < s.length ; i+=2){
      s[i] = shift(s[i-1],s[i]);     
  }
  return s.join('');
};
console.log(replaceDigits("a1c1e1"));